package jnpf.controller;


import io.swagger.annotations.ApiOperation;
import jnpf.common.resp.Result;
import jnpf.model.common.AnalyzeResult;
import jnpf.model.dify.talk.req.FlowTalkReq;
import jnpf.service.DifyFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotEmpty;


@RestController
@RequestMapping("/dify/file")
public class DifyFileController {
//    @Autowired
//    private DifyFileService difyService;

//    @GetMapping("/analyze/{fileId}")
//    @ApiOperation(value = "解析文件,获取DO名称", notes = "获取知识库列表")
//    public Result<AnalyzeResult> getDatasetList(@PathVariable("fileId") @NotEmpty(message = "文件id不能为空") String fileId) throws Exception {
//        return Result.OK(difyService.AnalyzeFile(fileId));
//    }

//    @PostMapping("/analyze/do")
//    @ApiOperation(value = "解析DO，获取DO详情", notes = "获取知识库列表")
//    public Result<AnalyzeResult> getDoDetail(@RequestBody FlowTalkReq flowTalkReq, @RequestParam("doName") @NotEmpty(message = "do名称不能为空") String doName) throws Exception {
//        return Result.OK(difyService.AnalyzeFileDo(doName, flowTalkReq));
//    }

}
